<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%request.setCharacterEncoding("utf-8");%>
<%@ page import="com.pphome.orgmodel.pojo.UserInfo"%>
<%@ page  language="java" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@include file="/include/pageexpires.jsp"%>
<%@include file="/include/filepath.jsp"%>
<%
 UserInfo  userInfo =(UserInfo)session.getAttribute("userinfoSess");
if(userInfo!=null) {
  String username=userInfo.getName();
%>
<table border="0" width="100%" cellpadding="0">
  <tr>
    <td>欢迎您：<%=username%></td>
  </tr>
</table>
<%
} else  //未登录或者登录不成功
{
%>
    <script language='javascript'>
      function openChat(){
      if(form1.username.value == ''){
      alert('用户名字不能为空');
      form1.username.focus();
      }else if(form1.password.value == ''){
      alert('用户密码不能为空');
      form1.password.focus();
      }else{
     // alert("username"+form1.username.value);
      //alert("password"+form1.password.value);
     window.top.opener  =  null; window.top.close();
     window.open("<%=request.getContextPath()%>/chat/login/login.jsp?username="+form1.username.value+"&password="+form1.password.value,"openChat", "status=no,resizable=yes,scrollbars=no,toolbar=no,WIDTH=220,HEIGHT=600")
      
     }
     }
      </script>

<link rel="stylesheet" href="<%=request.getContextPath()%>/chat/login/login.css" type="text/css">
<body background="<%=request.getContextPath()%>/chat/login/bgall.gif" bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" scroll=no>
  
  
  <table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
    <tr>
      <td align="center" valign="middle"> 
        <table width="200" border="0" cellspacing="1" cellpadding="0" bgcolor="#CCCCCC">
          <tr>
            <td bgcolor="#FFFFFF"><img src="<%=request.getContextPath()%>/chat/login/login.gif" width="638" height="387"></td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
  
  <form name="form1" >
    <DIV id=floater style="POSITION: absolute;LEFT:25%; TOP: 36%; VISIBILITY: visible; Z-INDEX: 2"> 
      <table width="305" border="0" cellspacing="0" cellpadding="0" height="153" background="<%=request.getContextPath()%>/chat/login/login01.gif">
        <tr>
          <td align="center" valign="top"> 
            <table width="90%" border="0" cellpadding="0" cellspacing="0">
              <tr> 
                <td align="center" width="37%" height="40">&nbsp;</td>
                <td align="center" width="63%" height="40">&nbsp;</td>
              </tr>
              <tr> 
                <td class="tableheader" width="37%" align="center" height="30">用户名称：</td>
                <td width="63%"> 
                  <input type="text" name="username" styleClass="input" size="10"/>
                </td>
              </tr>
              <tr> 
                <td class="tableheader" align="center" width="37%">用户密码：</td>
                <td width="63%" height="30"> 
                  <input type="password" name="password" redisplay="false" styleClass="input" size="10"/>
                </td>
              </tr>
              <tr valign="bottom"> 
                <td align="center" colspan="2" height="33"> 
                  <input type=button value="登录消息" class="button" onclick="openChat()">
                  
                  <input type=reset value=" 重 填 " class="button" name="submit2">
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </DIV>
  </form>
  
</body>
<%
}
%>
